package com.zhang.graph.undirectedgraph;




/**
 * @author zhang
 * @time 2022/02/26 08:31:21
 */
public class Test {
    public static void main(String[] args) {
        WeightedGraph01 wg = new WeightedGraph01();
        wg.addNode("A");
        wg.addNode("B");
        wg.addNode("C");
        wg.addNode("D");
        wg.addNode("E");

//        wg.addEdge("A","B",3);
//        wg.addEdge("B","D",4);
//        wg.addEdge("C","D",5);
//        wg.addEdge("A","C",1);
//        wg.addEdge("B","C",2);
//        wg.addEdge("C","D",1);
//        wg.addEdge("B","E",5);
//        wg.addEdge("D","E",6);
        wg.addEdge("A","B",3);
        wg.addEdge("A","C",4);
        wg.addEdge("A","D",2);
        wg.addEdge("B","E",1);
        wg.addEdge("B","D",6);
        wg.addEdge("D","E",5);
        wg.addEdge("D","C",1);

        WeightedGraph01.Path shortestPath = wg.getShortestPath("A", "C");
        System.out.println(shortestPath);

//       wg.getMinimumSpanningTree().print();

    }
}
